package com.mtsmda.chapter3.wrapperEx;

public class WrapperEx {
	
	public static void main(String[] args) {
		
		Boolean boolean1 = new Boolean("ghdbfsjbfj");
		System.out.println(boolean1);
		
		
		Integer integer = Integer.valueOf("100100", 2);
		System.out.println(integer);
		
		Integer integer8 = Integer.valueOf("100100", 8);
		System.out.println(integer8);
		
		Integer integer16 = Integer.valueOf("100100", 16);
		System.out.println(integer16);
		
		System.out.println(Integer.toString(15));
		
		System.out.println("_____________1______________");
		Integer x = 8;
		Integer y = 8;
		System.out.println(x == y);
		System.out.println(x.equals(y));
		x++;
		System.out.println(x == y);
		System.out.println(x.equals(y));
		
		System.out.println("_____________2______________");
		Integer i1 = new Integer(15);
		Integer i2 = new Integer(15);
		i2 = i1;
		System.out.println(i1.equals(i2));
		System.out.println(i1 == i2);
		i2++;
		System.out.println(i1.equals(i2));
		System.out.println(i1 == i2);
		
		System.out.println("''''''''''''''''''''");
		Integer ii1 = 1000;
		Integer ii2 = ii1;
		System.out.println(ii1 == ii2);
		ii2 = 1000;
		System.out.println(ii1 == ii2);
		System.out.println(ii1.equals(ii2));
		
		System.out.println("''''''''''''''''''''");
		Integer integer200 = -128;
		Integer integer200_2 = -128;
		System.out.println(integer200 == integer200_2);
		new WrapperEx().go();
		System.out.println("__________________");
		
		getArray(new int[]{15, 19, 26, 90, 196});
		System.out.println("__________________");
		getArray(1);
		System.out.println("__________________");
		getArray();
	}
	
	private void go() {
		Boolean boolean1 = true;
		Short s = 300;
		if(boolean1){
			System.out.println(s);
			System.out.println(s++);
			System.out.println(s);
		}
		
	}
	
	private static void getArray(int ...is ){
		if(is.length == 0){
			System.out.println("error");
		}
		for(int i : is){
			System.out.println(i);
		}
	}
	
}